#ifndef PIXEL_H_
#define PIXEL_H_

#include <cv.h>

class Pixel
{
public:
	Pixel();
	Pixel(int x, int y , int r, int g, int b, int alpha = 0, int nChannels = 3);
	Pixel(int x, int y , int rgb, int alpha = 0, int nChannels = 3);
	Pixel(CvPoint point, int r, int g, int b, int alpha = 0, int nChannels = 3);
	Pixel(CvPoint point, int rgb, int alpha = 0, int nChannels = 3);
	Pixel(int x, int y , CvScalar color, int alpha = 0, int nChannels = 3);
	Pixel(CvPoint point, CvScalar color, int alpha = 0, int nChannels = 3);
	virtual ~Pixel();


/* methods */	
public:
	
	//int* getRGB();
	int getR();
	int getG();
	int getB();
	int getAlpha();
	int getChannels();
	int getValue();
	
	CvPoint getPoint();
	
private:
	void init(int x, int y , int r, int g, int b, int alpha, int nChannels);
	
	
/* members */
public:

	int x;
	int y;
	CvPoint point;
	
	int nChannels;
	
	//int value[3]; //r, g, b and alpha channels
	int r,g,b,alpha;
	
};

#endif /*PIXEL_H_*/
